package com.school.manager.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.school.manager.domaim.TecClassStu;
import com.school.manager.entity.po.TecClassStuPo;
import com.school.manager.entity.vo.TecClassStuVo;
import com.school.manager.mapper.TecClassStuMapper;
import com.school.manager.service.ITecClassStuService;
import com.school.manager.utils.PageUtil;

import lombok.extern.slf4j.Slf4j;

/**
 * description：班级学生教师关联业务实现类
 * date：2021/10/133:18 下午
 */

@Service
@Slf4j
public class TecClassStuServiceImpl extends ServiceImpl<TecClassStuMapper, TecClassStu> implements ITecClassStuService {
	
	@Autowired
    private TecClassStuMapper tecClassStuMapper;
	
	@Override
	public Page<TecClassStuVo> page(TecClassStuPo tecClassStuPo) {
		QueryWrapper<TecClassStu> queryWrapper = PageUtil.buildQueryWrapper(tecClassStuPo, TecClassStu.class);
        Page<TecClassStu> page = new Page<>(tecClassStuPo.getCurrent(), tecClassStuPo.getSize());
        tecClassStuMapper.selectPage(page, queryWrapper);
        return PageUtil.buildPage(page, TecClassStuVo.class);
	}


}
